class Window_EquipSkill_Levels < Window_Base
  attr_reader   :record_index
  def initialize
    super(320, 0, 320, 480)
    @record_index = -1
    self.contents = Bitmap.new(self.width, self.height)
  end
  def draw(item, index)
    self.contents.clear
    @record_index = index
    array = item.descriptions
    self.contents = Bitmap.new(self.width - 10, array.size * 64)
    for i in 0...array.size
      draw_item(i, "等级" + (i + 1).to_s + ': ' + array[i], item.level == i + 1 ? normal_color : disabled_color)
    end
  end
  def draw_item(index, info, color)
    self.contents.font.color = color
    self.contents.draw_text(0, index * 32, self.width - 10, 32, info)
  end
end
